package com.rica.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.rica.dao.ClienteDao;
import com.rica.model.Cliente;
import com.rica.service.ClienteService;
@Service
public class ClienteServiceImpl implements ClienteService {
	
	@Autowired
	private ClienteDao clienteDao;
	
	@Transactional
	public void add(Cliente cliente) {
		clienteDao.add(cliente);
	}

	@Transactional
	public void edit(Cliente cliente) {
		clienteDao.edit(cliente);
	}

	@Transactional
	public void delete(Long cliente_id) {
		clienteDao.delete(cliente_id);
	}

	@Transactional
	public Cliente getCliente(Long cliente_id) {
		return clienteDao.getCliente(cliente_id);
	}

	@Transactional
	public List getAllCliente() {
		return clienteDao.getAllCliente();
	}

}
